<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/9/20
 * Time: 16:20
 */

$str = 'data:asdfasdfasdasfdata20170920asdfafdadata20170921sadfasasddata20170922fadata20170923s';

//$r = preg_replace('/\d{3,}/',"******",$str);
$r = preg_replace('/(data)(\d{8})/',"date$2",$str);

var_dump($r);


